package designmode.design1;

/**
 * Main
 *
 * @author lfg
 * @version 1.0
 */
public class Main {
    public static void main(String[] args) {
        //对AbstractAction扩展开放，但是修改关闭
        AbstractAction action1 = new Dog();
        action1.eat();

        AbstractAction action2 = new Cat();
        action2.eat();
    }
}
